package com.meilai.project.service.administration.goods.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.meilai.project.entity.administration.goods.GoodsStorageChangeRecord;
import com.meilai.project.mapper.administration.goods.GoodsStorageChangeRecordMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.meilai.project.service.administration.goods.GoodsStorageChangeRecordService;
import com.meilai.project.vo.administration.goods.GoodsStorageChangeRecordVO;
import org.springframework.stereotype.Service;

import java.time.LocalDate;

/**
 * <p>
 * 物品库存变化表 服务实现类
 * </p>
 *
 * @author xhy
 * @since 2022-12-21
 */
@Service
public class GoodsStorageChangeRecordServiceImpl extends ServiceImpl<GoodsStorageChangeRecordMapper, GoodsStorageChangeRecord> implements GoodsStorageChangeRecordService {

    @Override
    public Page<GoodsStorageChangeRecordVO> selectPageList(Integer current_page, Integer pageSize, Long goodsTypeId, LocalDate beginDate, LocalDate endDate, Long userId) {
        Page<GoodsStorageChangeRecordVO> page = new Page<>();
        return page.setRecords(baseMapper.selectList(page, goodsTypeId, beginDate, endDate, userId));
    }
}
